package com.young.web.ec.core.service;

import com.young.web.ec.events.menu.AllMenuItemsEvent;
import com.young.web.ec.events.menu.CreateMenuItemEvent;
import com.young.web.ec.events.menu.MenuItemDetailsEvent;
import com.young.web.ec.events.menu.RequestAllMenuItemsEvent;
import com.young.web.ec.events.menu.RequestMenuItemDetailsEvent;
import com.young.web.ec.persistence.services.MenuPersistenceService;

public class MenuEventHandler implements MenuService {

	private MenuPersistenceService menuPersistenceService;

	  public MenuEventHandler(MenuPersistenceService menuPersistenceService) {
	    this.menuPersistenceService = menuPersistenceService;
	  }
	  
	  public AllMenuItemsEvent requestAllMenuItems(RequestAllMenuItemsEvent requestAllMenuItemsEvent) {
	    return menuPersistenceService.requestAllMenuItems(requestAllMenuItemsEvent);
	  }

	  public MenuItemDetailsEvent requestMenuItemDetails(RequestMenuItemDetailsEvent requestMenuItemDetailsEvent) {
	    return menuPersistenceService.requestMenuItemDetails(requestMenuItemDetailsEvent);
	  }

	  public MenuItemDetailsEvent createMenuItem(CreateMenuItemEvent createMenuItemEvent) {
	    return menuPersistenceService.createMenuItem(createMenuItemEvent);
	  }
}
